<?php

use yii\widgets\DetailView;
use app\models\Dlfl;
use yii\data\ActiveDataProvider;
use yii\grid\GridView;
use app\models\Zjfl;
use app\models\LiujiModel;
use app\models\XiuxueModel;
use app\models\FuxueModel;
use app\models\TuixueModel;
$this->title = '学籍信息';
$this->params['breadcrumbs'][] = $this->title;
?>
<h4>学籍信息</h4> 
<?php if($model->stu_type==0)
            			$stu_type='本科生';
    		elseif ($model->stu_type==1)
    					$stu_type='硕士研究生';
    					else 
    						$stu_type='博士研究生';?>
    						
 <?php if($model->status==0)
            		$status='在读';
    		elseif ($model->status==1)
    				$status='休学';
    					elseif($model->status==2)
    					$status='退学';
    					elseif($model->status==3)
    					$status='保留入学资格';
    					elseif($model->status==4)
    					$status='毕业';
    					elseif($model->status==5)
    					$status='肄业';
    					else
    					$status='开除';?> 		
    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
           // 'id',
            'stu_id',
            'enroll_time',
                        [                     
            'label' => '学生类别',
            'value' => $stu_type,
        ],
            'major_name',
            'class_name',
            [
        		'label' => '学籍状态',
        		'value' => $status,
        		],
           // 'fore_major',
           // 'fore_class',
           // 'later_major',
            //'later_class',
        ],
    ]) ?>
 <hr>
 
 
<h4>学籍变动</h4> 
<?php   $dataProvider1 = new ActiveDataProvider([
            'query' => Dlfl::find()->where(['stu_id'=>$id]),
        ]); 
?>   
<table>
  <tr>
    <th>大类分流情况</th>   
  </tr>
</table>                 
 <?= GridView::widget([
        'dataProvider' => $dataProvider1,
        'columns' => [
            'before_major'=>[
            		'attribute' => 'before_major',
            		'value' => 'before_major',
            		'headerOptions' => ['width' => '285'],
 			],
            'after_major'=>[
            		'attribute' => 'after_major',
            		'value' => 'after_major',
            		'headerOptions' => ['width' => '285'],
 			],
            'befor_class'=>[
            		'attribute' => 'befor_class',
            		'value' => 'befor_class',
            		'headerOptions' => ['width' => '285'],
 			],
             'after_class'=>[
            		'attribute' => 'after_class',
            		'value' => 'after_class',
            		'headerOptions' => ['width' => '285'],
 			],
        ],
    ]); ?>    


<?php   $dataProvider2 = new ActiveDataProvider([
            'query' => Zjfl::find()->where(['stu_id'=>$id]),
        ]); 
 ?>  
 <table>
  <tr>
    <th>转专业情况</th>   
  </tr>
</table>                
 <?= GridView::widget([
        'dataProvider' => $dataProvider2,
        'columns' => [
            'before_major'=>[
            		'attribute' => 'before_major',
            		'value' => 'before_major',
            		'headerOptions' => ['width' => '285'],
 			],
            'after_major'=>[
            		'attribute' => 'after_major',
            		'value' => 'after_major',
            		'headerOptions' => ['width' => '285'],
 			],
            'befor_class'=>[
            		'attribute' => 'befor_class',
            		'value' => 'befor_class',
            		'headerOptions' => ['width' => '285'],
 			],
             'after_class'=>[
            		'attribute' => 'after_class',
            		'value' => 'after_class',
            		'headerOptions' => ['width' => '285'],
 			],
        ],
    ]); ?> 
  <table>
  <tr>
    <th>留级情况</th>   
  </tr>
</table>
 <?php   $dataProvider3 = new ActiveDataProvider([
            'query' => LiujiModel::find()->where(['stu_id'=>$id]),
        ]);   ?>           
 <?= GridView::widget([
        'dataProvider' => $dataProvider3,
        'columns' => [
            'handle_date'=>[
            		'attribute' => 'handle_date',
            		'value' => 'handle_date',
            		'headerOptions' => ['width' => '285'],
 			],
            'grade'=>[
            		'attribute' => 'grade',
            		'value' => 'grade',
            		'headerOptions' => ['width' => '285'],
 			],
            'class'=>[
            		'attribute' => 'class',
            		'value' => 'class',
            		'headerOptions' => ['width' => '285'],
 			],
            'reason'=>[
            		'attribute' => 'reason',
            		'value' => 'reason',
            		'headerOptions' => ['width' => '285'],
 			],
        ],
    ]); ?>
 
  <table>
  <tr>
    <th>休学情况</th>   
  </tr>
</table>
 <?php   $dataProvider4 = new ActiveDataProvider([
            'query' => XiuxueModel::find()->where(['stu_id'=>$id]),
        ]);   ?>                  
 <?= GridView::widget([
        'dataProvider' => $dataProvider4,
        'columns' => [
            'date'=>[
            		'attribute' => 'date',
            		'value' => 'date',
            		'headerOptions' => ['width' => '285'],
 			],
            'start_date'=>[
            		'attribute' => 'start_date',
            		'value' => 'start_date',
            		'headerOptions' => ['width' => '285'],
 			],
            'end_date'=>[
            		'attribute' => 'end_date',
            		'value' => 'end_date',
            		'headerOptions' => ['width' => '285'],
 			],
            'reason'=>[
            		'attribute' => 'reason',
            		'value' => 'reason',
            		'headerOptions' => ['width' => '285'],
 			],
        ],
    ]); ?>
 
 
  <table>
  <tr>
    <th>复学情况</th>   
  </tr>
</table>
 <?php   $dataProvider5 = new ActiveDataProvider([
            'query' => FuxueModel::find()->where(['stu_id'=>$id]),
        ]);   ?>                  
 <?= GridView::widget([
        'dataProvider' => $dataProvider5,
        'columns' => [
            'date'=>[
            		'attribute' => 'date',
            		'value' => 'date',
            		'headerOptions' => ['width' => '285'],
 			],
            'grade'=>[
            		'attribute' => 'grade',
            		'value' => 'grade',
            		'headerOptions' => ['width' => '285'],
 			],
            'class'=>[
            		'attribute' => 'class',
            		'value' => 'class',
            		'headerOptions' => ['width' => '285'],
 			],
            'reason'=>[
            		'attribute' => 'reason',
            		'value' => 'reason',
            		'headerOptions' => ['width' => '285'],
 			],
        ],
    ]); ?>
 
  <table>
  <tr>
    <th>退学情况</th>   
  </tr>
</table>
 <?php   $dataProvider6 = new ActiveDataProvider([
            'query' => TuixueModel::find()->where(['stu_id'=>$id]),
        ]);   
 ?> 
        
                         
 <?= GridView::widget([
        'dataProvider' => $dataProvider6,
        'columns' => [
            'sq_date'=>[
            		'attribute' => 'sq_date',
            		'value' => 'sq_date',
            		'headerOptions' => ['width' => '285'],
 			],
            'date'=>[
            		'attribute' => 'date',
            		'value' => 'date',
            		'headerOptions' => ['width' => '285'],
 			],
            'filenum'=>[
            		'attribute' => 'filenum',
            		'value' => 'filenum',
            		'headerOptions' => ['width' => '285'],
 			],
            'reason'=>[
            		'attribute' => 'reason',
            		'value' => 'reason',
            		'headerOptions' => ['width' => '285'],
 			],
        ],
    ]); ?>